# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Moo
pkgname=perl-${_realname}
pkgver=2.003004
pkgrel=1
pkgdesc="Minimalist Object Orientation (with Moose compatiblity)"
arch=('any')
url="https://metacpan.org/release/Moo"
groups=('perl-modules')
depends=('perl')
depends=('perl-Class-Method-Modifiers>=1.1' 'perl-Devel-GlobalDestruction>=0.11' 'perl-Import-Into>=1.002'
         'perl-Module-Runtime>=0.014' 'perl-Role-Tiny>=2' 'perl-Sub-Quote')
makedepends=('perl-Test-Fatal>=0.003')
license=('PerlArtistic' 'GPL')
source=("https://cpan.metacpan.org/authors/id/H/HA/HAARG/Moo-$pkgver.tar.gz")
sha256sums=('f8bbb625f8e963eabe05cff9048fdd72bdd26777404ff2c40bc690f558be91e1')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  MODULEBUILDRC=/dev/null \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
